
cc.Class({
    extends: require('UI-PanelWindow'),

    properties: {
    },
    onLoad(){
        this._super();
        global.GameLoop.GameMgr.pauseGame();
        // cc.find('view/revert/reverse1/reverse',this.node).runAction(cc.repeatForever(cc.rotateBy(1,360)))
    },
    onClick(e,d){
        if(d=='0'){
            // cc.log('观看视频')
            var self=this
            var options={
                adUnitId:'adunit-2d6a80d005f854b8',
                stopCb:function(){
                    global.EJMgr.showToast('视频未看完，不能继续游戏')
                },
                successCb:function(){
                    global.EJMgr.popUI();
                    global.GameLoop.GameMgr.resumeGame()
                }
            }
            global.WechatShare.videoOrShare(options)
        } else {
            // cc.isPauseGame = false;
            global.EJMgr.popUI();
            global.GameLoop.GameMgr.onPlayerDie();
        }
    }

    // update (dt) {},
});
